#-*- coding: utf-8 -*-
from tutor.scripts import *
from tutor.plugins.sympy import *

# Entradas
with display_block('Entradas'):
    theta = oneof(pi/3, pi/2, 2*pi/3)
    beta = cos(theta)
    a = One * oneof(1/Three, Half, sqrt(2)/2, sqrt(2), sqrt(3), 2, Three/2, 3)
    b = a * (1 + beta)
    
# Respostas
with display_block('Respostas'):
    card = (3 * pi * a**2)/2
    card_J = 2*pi*a
    card_circ = a**2 * (2*sin(theta) + cos(theta)*sin(theta)/2 + theta/2 - cos(theta)**2*theta - 2*cos(theta)*theta)
    card_circ_J = a * (sin(theta) - cos(theta) * theta)
    dif_card_circ = abs(card - pi*b**2)
    dif_card_circ_J = abs(card_J - pi*b**2)
    card_outro = abs(card - card_circ)
    card_outro_J = abs(card_J - card_circ_J)
